<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .button-container {
            display: flex;
            flex-wrap: wrap;
            flex-direction: column;
        }

        .button-container button {
            width: 100px;
            height: 50px;
            margin: 5px;
        }
    </style>

</head>

<body>
    <script>
        let arr = [2, 0, 6, 1, 77, 0, 52, 0, 25, 7]

        let newArr = []

        arr.forEach((item, index) => {
            if (item > 10) {
                newArr.push(item)
                console.log(`新增索引${index},值为${item}`)
            }

        }
        )
        // // 4.1 push()
        // arr.push(11)
        // console.log(arr)
        // // 4.2 pop()
        // arr.pop()
        // console.log(arr)
        // // 4.3 unshift()
        // arr.unshift(0)
        // console.log(arr)
        // // 4.4 shift()
        // arr.shift()
        // console.log(arr)
        // // 4.5 splice()
        // arr.splice(2, 2)
        // console.log(arr)

    </script>
</body>

</html>